//
//  ViewController.m
//  Test
//
//  Created by FallenK on 2016/10/25.
//  Copyright © 2016年 KFallen. All rights reserved.
//

#import "ViewController.h"
typedef NS_ENUM(NSInteger, Test) {
    TestA  = 0,
    TestB  = 1,
    TestC  = 2,
    TestD  = 3
};

typedef NS_ENUM(NSUInteger, Season) {
    Spring = 0,
    Summer = 1,
    Fall   = 2,
    Winter = 3
};

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    Season fa = Fall;
    
    Test test = TestB;
    NSLog(@"%ld",(long)test);
    
    
    
    UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(10, 50, 100, 50)];
    view1.backgroundColor = [UIColor blueColor];
    [self.view addSubview:view1];
    
    UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(15, 55, 100, 50)];
    view2.backgroundColor = [UIColor redColor];
    [self.view addSubview:view2];
    
    //如果将下面两行代码都注释掉   view1 会在下面   view2会在上面
    //  下面这行代码能够将view2  调整到父视图的最下面
        [self.view sendSubviewToBack:view2];
    //将view调整到父视图的最上面
//    [self.view bringSubviewToFront:view1];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
